package ${entityPackage};

import java.io.Serializable;
import java.util.Date;

import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 描述: ${table.comment}
 * author: ${author}
 * date: ${date}
 */
@TableName("${tableName}")
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="${tableName}对象", description="${table.comment}")
public class ${entity} implements Serializable {
    private static final long serialVersionUID = 1L;

<#-- 循环属性名称 -->
<#list table.fields as field>
    // ${field.comment}
    @ApiModelProperty(value = "${field.comment}")
    <#if field.propertyName == tbKey>
	@TableId(type = IdType.AUTO)
	<#else>
	<#if field.type =='DATE'>
	@Excel(name = "${field.comment}", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
	<#elseif field.type =='DATETIME'>
	@Excel(name = "${field.comment}", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	<#else>
	@Excel(name = "${field.comment}", width = 15)
    </#if>
	</#if>
    private ${field.propertyType} ${field.propertyName};

</#list>
}
